validateAndSetFlagged

open fun validateAndSetFlagged(input: T, vararg flag: EntryFlag.Flag): ValidationResult<T>

A setter method for the storedValue that first validates the value being set and then stores the post-validation result.

Flags applied to this field or passed into this method alter the normal behavior of validateAndSet

  • EntryFlag.Flag.QUIET: Will not call listeners

  • EntryFlag.Flag.STRONG: Will use strong validation as opposed to the normal weak validation

  • EntryFlag.Flag.UPDATE: Sync state will be updated as if changed in a GUI directly. This should only be used when the field has had it's state pushed (typically while a config GUI is open).

Return

ValidationResult of the input, after corrections, with applicable error messages.

Author

fzzyhmstrs

Since

0.5.9

Parameters

input

T. the pre-validation input of type T that will be validated and then stored, where T is the type of the wrapped value in this field.